package com.zhuss.timer;

import java.time.LocalDateTime;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.zhuss.bean.bo.core.CreateScheduleBo;
import com.zhuss.core.processor.ScheduleCreate;

@Component
@Configuration      
@EnableScheduling
public class InstanceFetchTimeScheduleTask {
	
	
	@Autowired
	private ScheduleCreate scheduleCreate;
	
	
    @Scheduled(cron = "1 10 0 * * ?")
    private void configureTasks() {
    	CreateScheduleBo bo = new CreateScheduleBo();
    	scheduleCreate.process(bo);
        System.err.println("执行静态定时任务时间: " + LocalDateTime.now());
    }
	
}
